package com.rank.ccms.service;

import com.rank.ccms.domain.model.AbstractEntity;
import com.rank.ccms.util.exception.ServiceException;

import java.io.Serializable;
import java.util.List;

/**
 * User: iru
 * Date: Feb 10, 2010
 * Time: 5:30:24 PM
 */
public interface GenericService<T extends AbstractEntity, PK extends Serializable> {

    PK insert(T t) throws ServiceException;

    void update(T t) throws ServiceException;

    void delete(T t) throws ServiceException;

    T findById(PK pk) throws ServiceException;

    List<T> getAll() throws ServiceException;
}
